﻿
namespace SwtorCalculator {
    /// <summary>
    /// Character Buff Class
    /// </summary>
    internal class Buff {
        /// <summary>
        /// Flask buff amount constant
        /// </summary>
        private const int FLASK_STAT = 90;
        private const int FLASK_SECONDARY = 52;

        /// <summary>
        /// Potion buff amount constant
        /// </summary>
        private const int MAIN_POTION_AMOUNT = 825;

        /// <summary>
        /// Potion cooldown constant
        /// </summary>
        private const int POTION_COOLDOWN = 180;

        /// <summary>
        /// Potion duration constant
        /// </summary>
        private const int POTION_DURATION = 15;

        /// <summary>
        /// Initializes a New Instance of the Buff Class
        /// </summary>
        internal Buff() { }

        #region "Class Buffs"
        /// <summary>
        /// Gets the Tooltip for Unearthed Power
        /// </summary>
        internal string UnearthedPowerText {
            get { return General.wrapText( "Increases the target's Strength, Aim, Willpower, and Cunning by 5% and internal and elemental damage reduction by 10% for 60 minutes." ); }
        }

        /// <summary>
        /// Gets the Bonus Stat Amount of Unearthed Power
        /// </summary>
        internal double UnearthedPower_Stats {
            get { return HasUnearthedPower ? 1.05 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Mitigation Amount of Unearthed Power
        /// </summary>
        internal double UnearthedPower_Reduction {
            get { return HasUnearthedPower ? .1 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Unearthed Power
        /// </summary>
        internal bool HasUnearthedPower { get; set; }

        /// <summary>
        /// Gets the Tooltip for Unearthed Might
        /// </summary>
        internal string UnearthedMightText {
            get { return General.wrapText( "Increases the target's Melee, Ranged, Force, and Tech bonus damage and healing by 5% for 60 minutes." ); }
        }

        /// <summary>
        /// Gets the Bonus Power Amount of Unearthed Might
        /// </summary>
        internal double UnearthedMight {
            get { return HasUnearthedMight ? 1.05 : 1; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Unearthed Might
        /// </summary>
        internal bool HasUnearthedMight { get; set; }

        /// <summary>
        /// Gets the Tooltip for Critical Serum
        /// </summary>
        internal string CriticalSerumText {
            get { return General.wrapText( "Increases the party's critical hit chance by 5% for 60 minutes." ); }
        }

        /// <summary>
        /// Gets the Bonus Crit Amount of Critical Serum : 
        /// </summary>
        internal double CriticalSerum {
            get { return HasCriticalSerum ? .05 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Critical Serum
        /// </summary>
        internal bool HasCriticalSerum { get; set; }

        /// <summary>
        /// Gets the Tooltip for Fortified Serum
        /// </summary>
        internal string FortifiedSerumText {
            get { return General.wrapText( "Increases the party's Endurance by 5% for 60 minutes." ); }
        }

        /// <summary>
        /// Gets the Bonus Endurance Amount of Fortified Serum : 
        /// </summary>
        internal double FortifiedSerum {
            get { return HasFortifiedSerum ? 1.05 : 1; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Fortified Serum
        /// </summary>
        internal bool HasFortifiedSerum { get; set; }
        #endregion

        #region "Personal Buffs"
        /// <summary>
        /// Gets the Tooltip for Damage Forms
        /// </summary>
        internal string DamageFormText {
            get { return General.wrapText( "Causes melee attacks to increase all melee damage dealt by 2% for 15 seconds. Stacks up to 5 times. " +
                "This effect cannot occur more than once every 1.5 seconds." ); }
        }

        /// <summary>
        /// Gets the Bonus Damage Amount of Damage Form
        /// TODO : Need to make it stackable
        /// </summary>
        internal double DamageForm {
            get { return HasDamageForm ? 1.02 : 1; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Damage Form
        /// </summary>
        internal bool HasDamageForm { get; set; }

        /// <summary>
        /// Gets the Tooltip for Tank Forms
        /// </summary>
        internal string TankFormText {
            get { return General.wrapText ( "Reduces all damage taken by 6%, increasing armor rating by 60%, and increasing all threat generated by 50%. " +
                "Increases shield chance by 20%. While active, taking damage builds 1 focus, but all \"Strike\" abilities generate 1 less focus. " +
                "This effect cannot occur more than once every 6 seconds." ); }
        }

        /// <summary>
        /// Gets the Bonus Damage Reduction Amount of Tank Form
        /// </summary>
        internal double TankForm_Reduction {
            get { return HasTankForm ? .06 : 0; }
        }

        /// <summary>
        /// Gets the Bonus Armor Increase Amount of Tank Form
        /// </summary>
        internal double TankForm_Armor {
            get { return HasTankForm ? 1.6 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Threat Increase Amount of Tank Form
        /// </summary>
        internal double TankForm_Threat {
            get { return HasTankForm ? 1.5 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Shield Chance Amount of Tank Form
        /// </summary>
        internal double TankForm_Shield {
            get { return HasTankForm ? .2 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Tank Form
        /// </summary>
        internal bool HasTankForm { get; set; }

        /// <summary>
        /// Gets the Tooltip for Talented Forms
        /// </summary>
        internal string TalentedFormText {
            get { return General.wrapText( "Increases accuracy by 3%. In addition, your successful melee attacks have a 20% chance to trigger a second force " +
                "strike that deals <<1>> energy damage. This effect cannot occur more than once every 1.5 seconds." ); } // Should be modeled like Blood-Caked Blade
        }

        /// <summary>
        /// Gets the Bonus Accuracy Amount of Talented Form
        /// </summary>
        internal double TalentedForm {
            get { return HasTalentedForm ? .03 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Talented Form
        /// </summary>
        internal bool HasTalentedForm { get; set; }

        /// <summary>
        /// Gets the Tooltip for Balance Forms
        /// </summary>
        internal string BalanceFormText {
            get { return General.wrapText( "Increases all damage dealt and reducing all damage received by 3%." ); }
        }

        /// <summary>
        /// Gets the Bonus Damage Amount of Balance Form
        /// </summary>
        internal double BalanceForm_Damage {
            get { return HasBalanceForm ? 1.03 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Reduction Amount of Balance Form
        /// </summary>
        internal double BalanceForm_Reduction {
            get { return HasBalanceForm ? .03 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Balance Form
        /// </summary>
        internal bool HasBalanceForm { get; set; }

        /// <summary>
        /// Gets the Tooltip for Armor Pen Cell
        /// </summary>
        internal string ArPenCellText {
            get { return General.wrapText( "While active, armor penetration is increased by <<1[%d/%d/%d]>>%." ); }
        }

        /// <summary>
        /// Gets the Bonus Armor Pen Amount of ArPen Cell
        /// </summary>
        internal double ArPenCell {
            get { return HasArPenCell ? .03 : 0; } // Placeholder Amount
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has ArPen Cell
        /// </summary>
        internal bool HasArPenCell { get; set; }

        /// <summary>
        /// Gets the Tooltip for Heal Cell
        /// </summary>
        internal string HealCellText {
            get { return General.wrapText( "Increases all healing done by 5%." ); }
        }

        /// <summary>
        /// Gets the Bonus Healing Amount of Heal Cell
        /// </summary>
        internal double HealCell {
            get { return HasHealCell ? 1.05 : 1; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Heal Cell
        /// </summary>
        internal bool HasHealCell { get; set; }

        /// <summary>
        /// Gets the Tooltip for Tank Cell
        /// </summary>
        internal string TankCellText {
            get { return General.wrapText( "Gives ranged attacks a chance to deal <<1>> additional energy damage. " +
                "Increases threat generation by 50%. Increases armor by 60%, decreases all damage taken by 5%, and increases shield chance by 20%." ); }
        }

        /// <summary>
        /// Gets the Extra Range Damage from Tank Cell
        /// </summary>
        internal int TankCell_Damage {
            get { return HasTankCell ? 50 : 0; } // Placeholder for Extra Damage
        }

        /// <summary>
        /// Gets the Bonus Threat Amount from Tank Cell
        /// </summary>
        internal double TankCell_Threat {
            get { return HasTankCell ? 1.5 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Armor Amount from Tank Cell
        /// </summary>
        internal double TankCell_Armor {
            get { return HasTankCell ? 1.6 : 1; }
        }

        /// <summary>
        /// Gets the Bnous Damage Reduction from Tank Cell
        /// </summary>
        internal double TankCell_Reduction {
            get { return HasTankCell ? .05 : 0; }
        }

        /// <summary>
        /// Gets the Bonus Shield Chance from Tank Cell
        /// </summary>
        internal double TankCell_Shield {
            get { return HasTankCell ? .2 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Tank Cell
        /// </summary>
        internal bool HasTankCell { get; set; }

        /// <summary>
        /// Gets the Tooltip for Damage Cell
        /// </summary>
        internal string DamageCellText {
            get { return General.wrapText( "Gives all of your attacks a chance to deal <<1>> additional elemental damage every 3 seconds for <<2[%d seconds/%d second/%d seconds]>>." ); }
        }

        /// <summary>
        /// Gets the Bonus Damage from Damage Cell
        /// </summary>
        internal double DamageCell {
            get { return HasDamageCell ? 50 : 0; } // Placeholder for Damage
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Damage Cell
        /// </summary>
        internal bool HasDamageCell { get; set; }

        /// <summary>
        /// Gets the Tooltip for Tank Charge
        /// </summary>
        internal string TankChargeText {
            get { return General.wrapText( "Gives your attacks a 50% chance to drain life force from the target, " +
                "dealing <<1>> internal damage and healing you for <<2>>. This effect cannot occur more than once every 1.5 seconds. " +
                "Increases your armor rating by 150%, all threat generated by 50%, reduces melee bonus damage by 5%, and increases shield chance by 20%." ); }
        }

        /// <summary>
        /// Gets the Bonus Damage from Tank Charge
        /// </summary>
        internal int TankCharge_Damage {
            get { return HasTankCharge ? 50 : 0; } // Placeholder for Damage Amount
        }

        /// <summary>
        /// Gets the Bonus Healing from Tank Charge
        /// </summary>
        internal int TankCharge_Heal {
            get { return HasTankCharge ? 50 : 0; } // Placeholder for Amount Healed
        }

        /// <summary>
        /// Gets the Bonus Armor Amount from Tank Charge 
        /// </summary>
        internal double TankCharge_Armor {
            get { return HasTankCharge ? 2.5 : 1; }
        }
        
        /// <summary>
        /// Gets the Bonus Threat Amount from Tank Charge
        /// </summary>
        internal double TankCharge_Threat {
            get { return HasTankCharge ? 1.5 : 1; }
        }

        /// <summary>
        /// Gets the Bonus Damage Reduction from Tank Charge
        /// </summary>
        internal double TankCharge_Reduction {
            get { return HasTankCharge ? .05 : 0; }
        }
        
        /// <summary>
        /// Gets the Bonus Shield Chance from Tank Charge
        /// </summary>
        internal double TankCharge_Sheild {
            get { return HasTankCharge ? .2 : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Tank Charge
        /// </summary>
        internal bool HasTankCharge { get; set; }

        /// <summary>
        /// Gets the Tooltip for Talented Charge
        /// </summary>
        internal string TalentedChargeText {
            get { return General.wrapText( "Gives your attacks a 25% chance to deal <<1>> internal damage. This effect cannot occur more than once every 1.5 seconds."); }
        }

        /// <summary>
        /// Gets the Bonus Damage Amount of Talented Charge
        /// </summary>
        internal double TalentedCharge {
            get { return HasTalentedCharge ? 50 : 0; } // Placeholder for Damage Amount
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Talented Charge
        /// </summary>
        internal bool HasTalentedCharge { get; set; }

        /// <summary>
        /// Gets the Tooltip for Damage Charge
        /// </summary>
        internal string DamageChargeText {
            get { 
                string v = Character.ClassName.Equals( "Jedi Consular" ) ? "kinetic" : "energy";
                return General.wrapText( "Gives your attacks a 50% chance to deal <<1>> " + v + " damage. This effect cannot occur more than once every 1.5 seconds."); }
        }

        /// <summary>
        /// Gets the Bonus Damage Amount of Damage Charge
        /// </summary>
        internal double DamageCharge {
            get { return HasDamageCharge ? 50 : 0; } // Placeholder Damage Amount
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Damage Charge
        /// </summary>
        internal bool HasDamageCharge { get; set; }
        #endregion

        #region "Flask Buffs"
        /// <summary>
        /// Gets the Bonus Stat Amount of Reflex Stim :
        /// Increases Aim by 90 and Power by 52 for 60 minutes.
        /// </summary>
        internal int ReflexStim_Stat {
            get { return HasReflexStim ? FLASK_STAT : 0; }
        }

        /// <summary>
        /// Gets the Bonus Secondary Amount of Reflex Stim
        /// </summary>
        internal int ReflexStim_Second {
            get { return HasReflexStim ? FLASK_SECONDARY : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Reflex Stim
        /// </summary>
        internal bool HasReflexStim { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount for Skill Stim : 
        /// Increases Cunning by 90 and Power by 52 for 60 minutes.
        /// </summary>
        internal int SkillStim_Stat {
            get { return HasSkillStim ? FLASK_STAT : 0; } 
        }

        /// <summary>
        /// Gets the Bonus Secondary Amount of Skill Stim
        /// </summary>
        internal int SkillStim_Second {
            get { return HasSkillStim ? FLASK_SECONDARY : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Skill Stim
        /// </summary>
        internal bool HasSkillStim { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount fo Might Stim : 
        /// Increases Strength by 90 and Power by 52 for 60 minutes.
        /// </summary>
        internal int MightStim_Stat {
            get { return HasMightStim ? FLASK_STAT : 0; }
        }

        /// <summary>
        /// Gets the Bonus Secondary Amount of Might Stim
        /// </summary>
        internal int MightStim_Second {
            get { return HasMightStim ? FLASK_SECONDARY : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Might Stim
        /// </summary>
        internal bool HasMightStim { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount for Resolve Stim : 
        /// Increases Willpower by 90 and Power by 52 for 60 minutes.
        /// </summary>
        internal int ResolveStim_Stat {
            get{ return HasResolveStim ? FLASK_STAT : 0; }
        }

        /// <summary>
        /// Gets the Bonus Secondary Amount of Resolve Stim
        /// </summary>
        internal int ResolveStim_Second {
            get { return HasResolveStim ? FLASK_SECONDARY : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Resolve Stim
        /// </summary>
        internal bool HasResolveStim { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount for Fortitude Stim : 
        /// Increases Endurance by 90 and Defense by 52 for 60 minutes.
        /// </summary>
        internal int FortStim_Stat {
            get { return HasFortStim ? FLASK_STAT : 0; }
        }

        /// <summary>
        /// Gets the Bonus Secondary Amount of Fortitude Stim
        /// </summary>
        internal int FortStim_Second {
            get { return HasFortStim ? FLASK_SECONDARY : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Fortitude Stim
        /// </summary>
        internal bool HasFortStim { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount for Command Stim : 
        /// Increases Presence by 90 for 60 minutes.
        /// </summary>
        internal int CommandStim_Stat {
            get { return HasCommandStim ? FLASK_STAT : 0; }
        }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Command Stim
        /// </summary>
        internal bool HasCommandStim { get; set; }
        #endregion

        #region "Potions"
        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Attack : 
        /// Increases Attack Power by 825 for 15s.
        /// </summary>
        internal int BattleAttackBuff { get { return GetReturnAmount( HasBattleAttack, UseBattleAttackAve ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Attack
        /// </summary>
        internal int BattleAttackAverage { get { return GetReturnAve( UseBattleAttackAve ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Attack
        /// </summary>
        internal bool HasBattleAttack { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Attack
        /// </summary>
        internal bool UseBattleAttackAve { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Efficacy : 
        /// Increases Healing Power by 825 for 15s.
        /// </summary>
        internal int BattleEfficacyBuff { get { return GetReturnAmount( HasBattleEfficacy, UseBattleEfficacyAve ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Efficacy
        /// </summary>
        internal int BattleEfficacyAverage { get { return GetReturnAve( UseBattleEfficacyAve ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Efficacy
        /// </summary>
        internal bool HasBattleEfficacy { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Efficacy
        /// </summary>
        internal bool UseBattleEfficacyAve { get; set; } 

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Critical : 
        /// Increases Critical Rating by 825 for 15s.
        /// </summary>
        internal int BattleCriticalBuff { get { return GetReturnAmount( HasBattleCritical, UseBattleCriticalAve ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Critical
        /// </summary>
        internal int BattleCriticalAverage { get { return GetReturnAve( UseBattleCriticalAve ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Critical
        /// </summary>
        internal bool HasBattleCritical { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Critical
        /// </summary>
        internal bool UseBattleCriticalAve { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Force : 
        /// Increases Force Power by 825 for 15s.
        /// </summary>
        internal int BattleForceBuff { get { return GetReturnAmount( HasBattleForce, UseBattleForceAve ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Force
        /// </summary>
        internal int BattleForceAverage { get { return GetReturnAve( UseBattleForceAve ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Force
        /// </summary>
        internal bool HasBattleForce { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Force
        /// </summary>
        internal bool UseBattleForceAve { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Tech : 
        /// Increases Tech Power by 825 for 15s.
        /// </summary>
        internal int BattleTechBuff { get { return GetReturnAmount( HasBattleTech, UseBattleTechAve ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Tech
        /// </summary>
        internal int BattleTechAverage { get { return GetReturnAve( UseBattleTechAve ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Tech
        /// </summary>
        internal bool HasBattleTech { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Tech
        /// </summary>
        internal bool UseBattleTechAve { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Triage : 
        /// Increases healing received by 600 for 15s.
        /// </summary>
        internal int BattleTriageBuff { get { return GetReturnAmount( HasBattleTriage, UseBattleTriageAve, 600 ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Triage
        /// </summary>
        internal int BattleTriageAverage { get { return GetReturnAve( UseBattleTriageAve, 600 ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Triage
        /// </summary>
        internal bool HasBattleTriage { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Triage
        /// </summary>
        internal bool UseBattleTriageAve { get; set; }

        /// <summary>
        /// Gets the Bonus Stat Amount of Battle Absorb : 
        /// Increases Armor by 3400 for 15s.
        /// </summary>
        internal int BattleAbsorbBuff { get { return GetReturnAmount( HasBattleAbsorb, UseBattleAbsorbAve, 3400 ); } }

        /// <summary>
        /// Gets the Average Bonus Stat Amount of Battle Absorb
        /// </summary>
        internal int BattleAbsorbAverage { get { return GetReturnAve( UseBattleAbsorbAve, 3400 ); } }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character has Battle Absorb
        /// </summary>
        internal bool HasBattleAbsorb { get; set; }

        /// <summary>
        /// Gets or Sets a Value Indicating if the Character Uses the Average Gain of Battle Absorb
        /// </summary>
        internal bool UseBattleAbsorbAve { get; set; }

        /// <summary>
        /// Returns the Buff Amount
        /// </summary>
        /// <param name="hasBuff">If Character has the Buff</param>
        /// <param name="useAve">If Use Average is Set</param>
        /// <returns>The Buff Amount</returns>
        private int GetReturnAmount( bool hasBuff, bool useAve ) {
            return hasBuff && !useAve ? MAIN_POTION_AMOUNT : 0;
        }

        /// <summary>
        /// Returns the Buff Amount
        /// </summary>
        /// <param name="hasBuff">If Character has the Buff</param>
        /// <param name="useAve">If Use Average is Set</param>
        /// <param name="gain">Buff Amount</param>
        /// <returns>The Buff Amount</returns>
        private int GetReturnAmount( bool hasBuff, bool useAve, int gain ) {
            return hasBuff && !useAve ? gain : 0;
        }

        /// <summary>
        /// Returns the Buff Amount
        /// </summary>
        /// <param name="useAve">If Use Average is Set</param>
        /// <returns>The Buff Amount</returns>
        private int GetReturnAve( bool useAve ) {
            return useAve ? ( MAIN_POTION_AMOUNT * POTION_DURATION / POTION_COOLDOWN ) : 0;
        }

        /// <summary>
        /// Returns the Buff Amount
        /// </summary>
        /// <param name="useAve">If Use Average is Set</param>
        /// <param name="gain">Buff Amount</param>
        /// <returns>The Buff Amount</returns>
        private int GetReturnAve( bool useAve, int gain ) {
            return useAve ? ( gain * POTION_DURATION / POTION_COOLDOWN ) : 0;
        }
        #endregion
    }
}
// MAIN_POTION_AMOUNT * POTION_DURATION / POTION_COOLDOWN;